<template>
  <div class="home-box">
    <header class="shop_title">
      <h5 class="title">小米手机及配件</h5>
      <div class="items clearfix">
        <div class="item-recom">
          <div class="advertise">
            <div class="advertise-item clearfix">
              <a href="#"><img src="../../assets/img/phone/mi/mi4.png"></a>
            </div>
          </div>
        </div>
      </div>
      <div class="sku-box store-content">
        <div class="gray-box">
          <div class="item-box">
            <shop-item :key="index" v-for="item,index in goodsData" :item="item"></shop-item>
          </div>
        </div>
      </div>
    </header>
    <prompt v-if="maxCount"></prompt>
  </div>
</template>

<script>
  import shopItem from '../../components/shop-item'
  import goodsData from '../../lib/newGoodsData'
  import propmt from '../../components/prompt'
    export default {
    data () {
      return {
        goodsData: goodsData
      }
    },
      components: {
      shopItem,
        propmt
      },
      computed: {
        maxCount () {
          return this.$store.state.maxOff
        }
      },
        name: "mi-phone"
    }
</script>

<style scoped>
  .home-box {
    overflow: hidden;
    position: relative;
    z-index: 0;
    margin-top: 25px;
    box-sizing: border-box;
    border-radius: 8px;
    box-shadow: 0 3px 8px -6px rgba(0,0,0,.1);
  }
  .shop_title {
    display: block;
    border-radius: 8px;
    position: relative;
    left: 60px;
    width: 1220px;
    font-size: 18px;
    line-height: 30px;
    color: #666;
    background: #fafafa;
    border-bottom: 1px solid rgba(0,0,0,.1);
  }
  .title {
    margin-left: 25px;
    font-weight: 700;
    padding: 5px;
  }
  .sku-box{
    position: relative;
  }
  .sort-option ul{
    height: 60px;
    line-height: 60px;
  }
  .sort-option li{
    position: relative;
    float: left;
    padding-left: 42px;
  }
  .sort-option li:first-child{
    padding-left: 9px;
  }
  .sort-option li:before{
    content: ' ';
    display: block;
    position: absolute;
    left: 20px;
    top: 50%;
    width: 2px;
    height: 2px;
    margin-top: -1px;
    background: #C7C7C7;
  }
  .sort-option li:first-child:before{
    display: none;
  }
  .sort-option a{
    display: block;
    font-size: 12px;
    color: #999;
  }
  .sort-option a.active, .sort-option a:hover{
    color: #5683EA;
  }
  .gray-box{
    overflow: hidden;
    background: #fff;
    border-radius: 0px;
    border: 1px solid #dcdcdc;
    border-color: rgba(0,0,0,.14);
    box-shadow: 0 3px 8px -6px rgba(0,0,0,.1);
  }
  .sku-box .item-box{
    clear: both;
    overflow: hidden;
    margin: 0 -1px -1px -1px;
  }
  .items {
    margin: 0 -1px -1px;
    overflow: hidden;
  }
  .item-recom {
    width: 50%;
    position: relative;
    float: left;
    height: 429px;
  }
  .item-recom .advertise {
    box-sizing: border-box;
    border: 1px solid #efefef;
    border-width: 0 1px 1px 0;
  }
  .advertise {
    display: flex;
    height: 100%;
  }
  .advertise-item {
    position: relative;
    flex: 1;
    border-right: 1px solid #eee;
  }
  img {
    width: 1220px;
    height: 429px;
  }
</style>
